<!--
 * @Author: changjun
 * @FilePath: /yuan-qingdao-zld-browser/src/components/CommonCard/CommonCard.vue
 * @Date: 2022-08-08 11:36:50
 * @Description: 
 * @LastEditTime: 2022-12-15 10:26:18
 * @LastEditors: 李佐宁
-->
<script setup lang="ts">
interface CommonCardProps {
  title: string;
}
const {title= ''} = defineProps<CommonCardProps>()
</script>

<template>

  <div class="ya-card ya-bg-colors ya-border-color" >
    <div class="title-box">
      <div class="title prefix ya-primary-text">{{ title }}</div>
    </div>
    <div class="title-center">
      <slot></slot>
    </div>
  </div>

</template>


<style lang="scss" scoped>

.ya-card{
  width: 100%;
  padding: 16px 24px;
  box-sizing: border-box;
  // background: #FFFFFF;
  border-radius: 4px;
  display: flex;
  // border: 1px solid #FFFFFF;
  flex-direction: column;
  min-width: 0;
  position: relative;
  border: 1px solid #fff;
  height: 100%;

  .prefix{
    position: relative;
  }
  .prefix::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto 0;
    width: 3px;
    height: 14px;
    background: #0095FF;
  }

  .title-box{
    min-width: 0;
  }
  .title-center {
    height: 100%;
  }
  .title{
    font-size: 14px;
    font-weight: 600;
    color: rgba(0,0,0,0.6500);
    padding-left: 11px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}
</style>
